import request from '@/utils/request'

export default {
  getAllStudent(searchModel){  //获取列表中学生信息 以及搜索学生信息
    return request({
      url: `/system/jiaowu/xueqi/${searchModel.pageNo}/${searchModel.pageSize}`,
      method: 'get',
      params:{
        // pageNo: searchModel.pageNo,
        // pageSize: searchModel.pageSize,
        // class: searchModel.class,
        academicYear: searchModel.year
      }
    });
  },
  addSemester(semester){  //添加学生用户
    return request({
      url: "/system/jiaowu/addOrUpdateSemester",
      method: 'post',
      data: semester
    });
  },
  deleteById(id) {  // 通过id 删除学生信息
    return request({
        url: `/system/jiaowu/${id}`,
        method: 'delete',
        // data: student
    });
},
getById(id) {    // 通过学生id 进行回显
  return request({
      url: `/system/jiaowu/getid/${id}`,
      method: 'get',
  });
},
}